package com.msunsoft.business.dictionary.lucence;

import java.io.IOException;
import java.util.List;

import org.apache.lucene.search.highlight.InvalidTokenOffsetsException;

public interface LuceneContentInterface<T> {

    /**
     * Lucene文档，创建，更新并保存到Lucene文件系统中
     * 
     * @param item
     * @return
     * @throws IOException
     */
    public Integer createIndex(T item) throws IOException;

    /**
     * Description：按照ID进行索引
     * 
     * @author dennisit@163.com Apr 3, 2013
     * @param id
     */
    public void delete(T item);

    /**
     * 删除全部索引
     */
    public void deleteAll();

    public List<T> searchList(T item,int first,int max) throws IOException,InvalidTokenOffsetsException;

    public boolean loadAllDatasetDictionaryItem() throws IOException;
}
